package com.ssamkj.wstar.common;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

import com.ssamkj.rssbot.RssRobotController;
import com.ssamkj.rssbot.framework.IRSSListService;
import com.ssamkj.wstar.dto.godMode.RSS_List;
import com.ssamkj.wstar.service.IGodModeService;

public class Starter implements ApplicationListener<ApplicationEvent>{

	@Autowired
	IGodModeService rssRobotService;
	
	@Override
	public void onApplicationEvent(ApplicationEvent arg0) {
		 List<RSS_List> list = rssRobotService.readRSS_List();
		 RssRobotController robot = RssRobotController.getInstance();
		 IRSSListService a = (IRSSListService) rssRobotService;
		 
		 robot.setRssService(a);
		 
		 robot.doAction();
		 for(RSS_List r : list){
//			 System.out.println(r);
		 }
	}

}
